// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.modules.dao.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.liuxinlong.modules.dao.UserPostRelationDao;
import com.liuxinlong.modules.entity.UserPostRelation;
import com.liuxinlong.modules.mapper.UserPostRelationMapper;
import com.liuxinlong.modules.system.dto.GroupMember;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 类描述
 * <p>
 * 此类关联设计的功能
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022年8月1日
 */
@Service
public class UserPostRelationDaoImpl extends ServiceImpl<UserPostRelationMapper, UserPostRelation> implements UserPostRelationDao {

    @Override
    public List<GroupMember> pagePostMemberList(Map<String, Object> queryParam) {
        return baseMapper.pagePostMemberList(queryParam);
    }

    @Override
    public int getPostMemberCount(Map<String, Object> queryParam) {
        return baseMapper.getPostMemberCount(queryParam);
    }

    @Override
    public void deleteByUserIds(String groupId, Set<String> userList) {
        baseMapper.deleteByUserIds(groupId,userList);
    }

    @Override
    public void deleteByUserId(String userId) {
        baseMapper.deleteByUserId(userId);
    }

    @Override
    public List<UserPostRelation> queryRelationByUserId(String userId) {
        return baseMapper.queryRelationByUserId(userId);
    }

    @Override
    public UserPostRelation queryRelationByInfo(String userId, String groupId) {
        return baseMapper.queryRelationByInfo(userId,groupId);
    }

    @Override
    public void deleteByUserIdList(List<String> userIdList) {
        baseMapper.deleteByUserIdList(userIdList);
    }

}
